<template>
	<div>
		<h1></h1>
		父亲
		<input type="text" v-model="lifemsg" />
		<Son :title="msg" :lifemsg="lifemsg" :num="num"></Son>
		<button @click="changeMsg">按钮</button>
	</div>
</template>

<script>
	import Son from './son'
	export default{
		name:'mc',
		data(){
			return{
				msg:"父组件向子组件传递数据",
				lifemsg:"hello",
				num:10
			}
		},
		components:{
			Son:Son
		},
		methods:{
			changeMsg(event){
				this.msg="我是修改完的数据";
			}
		}
	}
</script>

<style scoped>
</style>
